package com.google.code.sms.command;

import com.google.code.sms.domain.User;
import com.google.code.sms.domain.Player;
import com.google.code.sms.domain.MediaElement;

import java.util.*;

/**
 * Command used in {@link SearchController}.
 *
 * @author Sindre Mehus
 */
public class SearchCommand {

    private String query;
    private List<MediaElement> audioElements;
    private List<MediaElement> videoElements;
    private List<MediaElement> directoryElements;
    private boolean isIndexBeingCreated;
    private User user;
    private Player player;

    public String getQuery() {
        return query;
    }

    public void setQuery(String query) {
        this.query = query;
    }

    public boolean isIndexBeingCreated() {
        return isIndexBeingCreated;
    }

    public void setIndexBeingCreated(boolean indexBeingCreated) {
        isIndexBeingCreated = indexBeingCreated;
    }

    public List<MediaElement> getAudioElements() {
        return audioElements;
    }

    public void setAudioElements(List<MediaElement> audioElements) {
        this.audioElements = audioElements;
    }

    public List<MediaElement> getVideoElements() {
        return videoElements;
    }

    public void setVideoElements(List<MediaElement> videoElements) {
        this.videoElements = videoElements;
    }

    public List<MediaElement> getDirectoryElements() {
        return directoryElements;
    }

    public void setDirectoryElements(List<MediaElement> directoryElements) {
        this.directoryElements = directoryElements;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public Player getPlayer() {
        return player;
    }

    public void setPlayer(Player player) {
        this.player = player;
    }

    public static class Match {

        private MediaElement mediaElement;
        private String title;
        private String album;
        private String artist;

        public Match(MediaElement mediaElement, String title, String album, String artist) {
            this.mediaElement = mediaElement;
            this.title = title;
            this.album = album;
            this.artist = artist;
        }

        public MediaElement getMediaElement() {
            return mediaElement;
        }

        public String getTitle() {
            return title;
        }

        public String getAlbum() {
            return album;
        }

        public String getArtist() {
            return artist;
        }
    }
}
